﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WJSocketClient
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        SCClient sCClient;
        private void Form1_Load(object sender, EventArgs e)
        {
            sCClient = new SCClient();
            sCClient.Connect("192.168.0.232",8088);
            sCClient.scRecvEvent += SCRecvEvent;
        }
        void SCRecvEvent(Socket socketSend, SC.MessageType messageType, byte[] objBuf)
        {
            Console.WriteLine(objBuf.Length);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            sCClient.Send<string>(SC.MessageType.StateChange, "abc");
        }
    }
}
